package com.tkjt.pms.modules.kpiadmin.controller;

import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.vo.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tkjt.pms.modules.common.service.TkIndexValueActionsService;
import com.tkjt.pms.modules.kpiadmin.vo.KpiCalcRecordsQueryVo;
import com.tkjt.pms.modules.kpiadmin.vo.KpiCalcRecordsVo;

@RestController
@RequestMapping("/api/pms/kpiadmin/records")
public class KpiAdminRecordsController {

	@Autowired
	private TkIndexValueActionsService tkIndexValueActionsService;

	/**
	 ** 绩效计算-状态&历史记录
	 */
	@RequestMapping("/calcDatagrid")
	public Result<IPage<KpiCalcRecordsVo>> calcRecords(@RequestBody KpiCalcRecordsQueryVo vo) {

		Result<IPage<KpiCalcRecordsVo>> results = new Result<IPage<KpiCalcRecordsVo>>();

		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
		if (loginUser == null) {
			results.setMessage("用户非");
			results.setSuccess(false);
			return results;
		}
		
		//Page<KpiCalcRecordsVo> page = new Page<KpiCalcRecordsVo>(vo.getPageNo(), vo.getPageSize());
		// List<TkIndexValueActions> list = tkIndexValueActionsService.getActionRecords();

		return results;
	}

}
